package com.briup.es.client;

import com.briup.es.config.response.Result;
import com.briup.es.domain.vo.BookVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

// 创建远程调用的客户端，用于调用远程服务
@FeignClient("goods-service")
public interface BookClient {

    @PostMapping("/book/queryByIds")
    Result<List<BookVO>> queryByIds(@RequestBody List<Integer> ids);

    @GetMapping("/book/queryById")
    Result<BookVO> queryById(@RequestParam("id") Integer id);
}
